package com.book.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.book.pojo.Dictionaries;
import com.book.mapper.DictionariesDao;
import com.book.service.DictionariesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fk
 * @since 2023-10-12 14:58:28
 */
@Service
public class DictionariesServiceImpl extends ServiceImpl<DictionariesDao, Dictionaries> implements DictionariesService {

    @Autowired
    private DictionariesDao dictionariesDao;

    @Override
    public List<Dictionaries> getByType(String dictionariesType) {
        QueryWrapper<Dictionaries> dqw = new QueryWrapper<>();
        dqw.eq("dictionaries_type",dictionariesType);
        return dictionariesDao.selectList(dqw);
    }
}
